﻿<%@ Page Title="Skupiny uživatelů" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="HomePage.aspx.cs" Inherits="Altairis.FluffyCloud.WebCore.Pages.Groups.HomePage" %>
<asp:Content ContentPlaceHolderID="Main" runat="server">
    <h1>Skupiny uživatelů</h1>
    <asp:ListView ID="GroupList" runat="server" ItemType="Altairis.FluffyCloud.Data.Role" SelectMethod="GroupList_GetData">
        <LayoutTemplate>
            <table class="grid">
                <thead>
                    <tr>
                        <th>Název</th>
                        <th>Popis</th>
                        <th>Počet členů</th>
                    </tr>
                </thead>
                <tbody>
                    <asp:PlaceHolder ID="ItemPlaceHolder" runat="server" />
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td class="code">
                    <asp:HyperLink NavigateUrl='<%# this.GetRouteUrl("GroupDetail", new { rolename = Item.RoleName }) %>' Text="<%#: Item.RoleName %>" runat="server" />
                </td>
                <td><%#: Item.Description %></td>
                <td class="r"><%#: Item.Users.Count %></td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <p>
        <asp:Button ID="CreateRoleButton" Text="Nová skupina" runat="server" OnClick="CreateRoleButton_Click" />
    </p>
</asp:Content>